home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inventor Labs: Technology
/
INVENTORLABS_TECHNOLOGY.BIN
/
mac
/
FILES
/
EDISON.DIR
/
00467_Script_AutoTele parent
< prev
next >
Wrap
Text File
|
1997-05-26
|
5KB
|
160 lines
--p telegraph
property pSectionStartSprite, pNumOfSection, pKeysStartSprite
property pKeysDB, pStartFrame, pActiveSection, pCursorlst
property pInstructionTxtCast, pNumOfLetter
global gActorListMgrObj, pQTsprite, pAutoTeleSeq, gInterfaceMgrObj, gSndPath, gUtilityObj
----------------------------------------------------------------------------------------------------------------
on mInit me
cursor 4
Sound playFile 2, gSndPath & "EAUINTR.AIF"
set pSectionStartSprite = 2
set pNumOfSection = 4
--set pKeysStartSprite = pSectionStartSprite + pNumOfSection -1
set pKeysStartSprite = 6
set keydbtext = the text of cast "AutoTele keys"
set pKeysDB = [value(line 1 of keydbtext), value(line 2 of keydbtext),value(line 3 of keydbtext),value(line 4 of keydbtext)]
set pStartFrame = the frame
set pActiveSection = 1
set pQTsprite = 23
set the movietime of sprite pQTsprite = 0
set pAutoTeleSeq = []
set pCursorlst = [:]
repeat with SpriteNum = pSectionStartSprite to (pSectionStartSprite + pNumOfSection)
addprop(pCursorlst,SpriteNum,#FINGER)
end repeat
addprop(pCursorlst,1,#Operate)
set pInstructionTxtCast = the number of cast "instrTxt"
mUnSetAllCursors (gUtilityObj)
mSetCursors (gUtilityObj, pCursorlst)
mSetCursors(gUtilityObj, [21:#Return, 22:#Return])
mSetToolBtns (gInterfaceMgrObj, #TELEGRAPH, me)
mClearToolHilite (gInterfaceMgrObj)
set pNumOfLetter = 0
cursor -1
return( me )
end mInit
----------------------------------------------------------------------------------------------------------------
on mclose me
puppetsprite 4, false
mUnSetAllCursors (gUtilityObj)
end mclose
----------------------------------------------------------------------------------------------------------------
on mStepFrame me
if rollover( pSectionStartSprite ) then set pActiveSection = 1
else if rollover( pSectionStartSprite + 1) then set pActiveSection = 2
else if rollover( pSectionStartSprite + 2) then set pActiveSection = 3
else if rollover( pSectionStartSprite + 3) then set pActiveSection = 4
go frame (pStartFrame + pActiveSection)
end mStepFrame
----------------------------------------------------------------------------------------------------------------
on mKeyPressed me
set WhatKey = (the clickon - pKeysStartSprite) + 1
set section = getat( pKeysDB, pActiveSection)
set offset = getat([0,6,20,26] ,pActiveSection)
set Index = WhatKey + offset
set start = (WhatKey + offset - 1) * 8
sound stop 2
puppetsound 2, (the number of cast "EAUKYSND.AIF")
repeat with counter = 1 to 3
set start = start + counter
set the movietime of sprite pQTsprite = start
updatestage
end repeat
sound stop 2
if (count(pAutoTeleSeq) < 14) then
append( pAutoTeleSeq, Index)
if the movietime of sprite (pQTsprite + 1)> 1 then
sound stop 2
updatestage
set the movietime of sprite (pQTsprite + 1) = 20
end if
updatestage
set the movierate of sprite (pQTsprite + 1) = 1
updatestage
repeat while the movietime of sprite (pQTsprite + 1) = 1
updatestage
end repeat
set the movietime of sprite pQTsprite = start - 5
updatestage
else mSetUpTape( me )
if (Index = 26) then mSetUpTape( me )
end mKeyPressed
----------------------------------------------------------------------------------------------------------------
on mSetUpTape me
sound stop 2
mUnSetAllCursors (gUtilityObj)
mSetCursors(gUtilityObj, [21:#Return, 22:#Return])
go "Message"
end mSetUpTape
----------------------------------------------------------------------------------------------------------------
on mSetZoomCursor me
set handcursor = the number of cast "zoom in.pic"
set the cursor of sprite 12 = [handcursor, handcursor + 1]
end mSetZoomCursor
----------------------------------------------------------------------------------------------------------------
on mWriteTape me
set numofLetters = count( pAutoTeleSeq )
puppetsprite 4, True
set pLetterStartCast = the number of cast "EAU1.PIC"
set currloch = the loch of sprite 4
repeat with counter = 1 to numofLetters
set the castnum of sprite 4 = pLetterStartCast + getat(pAutoTeleSeq, counter) - 1
updatestage
if counter < numofLetters then
set currloch = currloch + 32
set the loch of sprite 4 = currloch
end if
end repeat
end mWriteTape
------------------------------------------------------------------------------------------------------------------ò
on mZoom me, WhatactiveRect
if WhatactiveRect = 1 then go frame "Tape Zoom"
else go frame "Zoom Reciever"
mClearToolHilite (gInterfaceMgrObj)
end mZoom
------------------------------------------------------------------------------------------------------------------ò
on mOperate me, WhatactiveRect
if WhatactiveRect = 1 then go frame "TELEGRAPH"
else if WhatactiveRect = 2 then go frame "Transmitter"
else go frame "Reciever"
mClearToolHilite (gInterfaceMgrObj)
end mOperate
------------------------------------------------------------------------------------------------------------------ò